import {defineStore} from "pinia";

export const useGinStore = defineStore('api', {
    state: () => (
        {
            is_running: false,
            btn_type: "primary",
            btn_text: "启动服务",
        }),
    getters: {},
    actions: {
        startGin() {
            this.is_running = true
            this.btn_type = "warning"
            this.btn_text = "停止服务"
        },
        stopGin() {
            this.is_running = false
            this.btn_type = "primary"
            this.btn_text = "启动服务"
        },
    },
})